import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import './plugins/http.js'

Vue.config.productionTip = false

Vue.prototype.checkAction = function(aId){
   let arr= store.state.user && Array.isArray(store.state.user.actionPermissions) ? store.state.user.actionPermissions : [];

  for(let i=0;i<arr.length;i++){
    if(arr[i].id==aId){
      return true;
    }
  }
  return false;
}

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
